Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omit namespace from service checks & events #18

Merged
merged 2 commits into from
Mar 3, 2018

Conversation

bgerstle
Copy link
Contributor

@bgerstle bgerstle commented Feb 28, 2018

Problem

We noticed that our Rust app wasn't sending events to Datadog, and discovered Datadog was failing to parse the event "metric":

| ERROR | dd.dogstatsd | dogstatsd(dogstatsd.py:451) | Error receiving datagram umar._e{10,16}:umar_start|version: d868cec|#environment:testing,version:d868cec

Solution

As it turns out, neither events nor service checks are supposed to have the namespace. prefix, so it needs to be removed.

Implementation

As format_for_send seems to be the nexus for all message formatting logic, I changed its metric argument to accept Metric values, which now indicate whether the namespace prefix should be added based on uses_namespace. This resulted in some changes to the expected test values, since I had to pass in an example CountMetric to the updated format_for_send function.

@bgerstle bgerstle force-pushed the feature/omit-namespace-fix branch from 26e7b05 to 7b14f32 Compare March 1, 2018 05:24
@mcasper
Copy link
Owner

mcasper commented Mar 3, 2018

Nice catch!

@mcasper mcasper merged commit ae34726 into mcasper:master Mar 3, 2018
@mcasper
Copy link
Owner

mcasper commented Mar 3, 2018

Published in 0.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants